import { ApiProperty } from '@nestjs/swagger';
import { Exclude, Expose } from 'class-transformer';
import { IsNotEmpty } from 'class-validator';

export class ContactDto {
  @Exclude()
  _id: string;
  @Expose({ name: 'l' })
  /** 首字母 */
  letter?: string;
  @ApiProperty({
    description: '名称',
  })
  name: string;
  phone?: string;
  wechat?: string;
  status: number;
  create_time?: number;
  uid?: string;
}
export class ContactRes {
  code: number;
  @IsNotEmpty()
  data: {
    list: ContactDto[];
  };
  tk?: string;
}
